package com.flyduck.system.vo.role.trans;


import cn.hutool.core.bean.BeanUtil;
import com.flyduck.system.entity.SysRoleEntity;
import com.flyduck.system.vo.role.SysRoleAddReqVO;
import com.google.common.base.Function;


/**
 * @program: flyduck-platform
 * @description:
 * @author: flyduck
 * @create: 2021-02-01 12:42
 **/
public class SysRoleAddReqVOToSysRoleEntity implements Function<SysRoleAddReqVO, SysRoleEntity> {

    @Override
    public SysRoleEntity apply(SysRoleAddReqVO reqVO) {
        SysRoleEntity roleEntity = new SysRoleEntity();
        BeanUtil.copyProperties(reqVO,roleEntity);
        roleEntity.setSort(Integer.valueOf(reqVO.getSort()));
        return roleEntity;
    }
}
